﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BuildPlannerLib.Buildings;

namespace BuildPlannerLib.Terran.Buildings
{
    // Derived class from MainBuilding for Command Centers
    public class CommandCenter : MainBuilding
    {
        // Constructor with parameters for name, cost, time duration, and supply produced
        public CommandCenter()
        {
            Name = "Command Center";

            MineralCost = 400;
            TimeDuration = 10000;

            SupplyProduced = 11;

            IndividualMainBuildings = new List<IndividualMainBuilding>();
            AddBuilding();
            Started = 1;
        }

        // Overrides AddBuilding() to add a new instance of IndividualCommandCenter located at base 0 to the IndividualMainBuildings list
        public override void AddBuilding()
        {
            IndividualMainBuildings.Add(new IndividualCommandCenter(0));
        }

        // This overload allows for specifying the base for the new Command Center
        public void AddBuilding(int atBase)
        {
            IndividualMainBuildings.Add(new IndividualCommandCenter(atBase));
        }
    }
}
